import https from '../libs/mehaotian-request/interface.js'
import config from '../config/index.js'
import qs from 'qs'
/**
 * 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 * handle [boolean] 如果需要自己处理 catch 请求 ，传入 true ，交给接口统一处理 ，请传如 false或不传
 */
/**
 * 分类
 */
export const productCategoryList = (data) => {
	return https ({
		url: '/api/uc/mobile/productCategoryService/findList',
		data: data,
		method: 'get'
	})
}
/**
 * 通过分类id查询商品列表
 */
export const productInfoList = (data) => {
	return https ({
		url: '/api/uc/mobile/productInfoService/findList',
		data: data,
		method: 'post'
	})
}
/**
 * id查询商品
 */
export const productInfo = (data) => {
	return https ({
		url: '/api/uc/mobile/productInfoService/get',
		data: data,
		method: 'post'
	})
}
/**
 * 下单
 */
export const orderCreate = (data) => {
	return https ({
		url: '/api/uc/mobile/orderService/create',
		data: data,
		method: 'post'
	})
}
/**
 * 查询预定设置接口
 */
export const selectReserveSetting = (data) => {
	return https ({
		url: '/api/uc/mobile/reserveService/selectReserveSetting',
		data: data,
		method: 'post'
	})
}
/**
 * 预约下单
 */
export const insertReserveRecord = (data) => {
	return https ({
		url: '/api/uc/mobile/memberReserveRecordService/reserveRecord',
		data: data,
		method: 'post'
	})
}
/**
 * 查看个人预约列表
 */
export const selectReserveRecordListByOpenid = (data) => {
	return https ({
		url: '/api/uc/mobile/memberReserveRecordService/selectReserveRecordListByOpenid',
		data: data,
		method: 'post'
	})
}
/**
 * 查看个人预约详情
 */
export const selectReserveRecordById = (data) => {
	return https ({
		url: '/api/uc/mobile/memberReserveRecordService/selectReserveRecordById',
		data: data,
		method: 'post'
	})
}
/**
 * 核销预约
 */
export const updateReserveRecordByCode = (data) => {
	return https ({
		url: '/api/uc/mobile/memberReserveRecordService/updateReserveRecordByCode',
		data: data,
		method: 'post'
	})
}
/**
 * 预约选择门店
 */
export const selectShopList = (data) => {
	return https ({
		url: '/api/uc/mobile/reserveService/selectShopList',
		data: data,
		method: 'post'
	})
}
/**
 * 取消预约
 */
export const updateReserveRecord = (data) => {
	return https ({
		url: '/api/uc/mobile/memberReserveRecordService/updateReserveRecord',
		data: data,
		method: 'post'
	})
}
/**
 * 积分查询商品列表
 */
export const productInfoListJf = (data) => {
	return https ({
		url: '/api/uc/mobile/productInfoService/findList',
		data: data,
		method: 'get'
	})	
}
/**
 * 积分下单
 */
export const insertUserIntegralReciveRecord = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralReciveRecordService/insertBatchUserIntegralReciveRecord',
		data: data,
		method: 'post'
	})
}
/**
 * 我的订单-积分
 */
export const selectUserIntegralReciveRecordList = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralReciveRecordService/selectUserIntegralReciveRecordList',
		data: data,
		method: 'get'
	})	
}
/**
 * 我的积分
 */
export const selectUserIntegralById = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralService/getByCardNo',
		data: data,
		method: 'get'
	})	
}
/**
 * 市民卡用户信息
 */
export const getOpenidMsg = (data) => {
	return https ({
		url: '/api/uc/ctcyq/userSstService/getOpenidMsg',
		data: data,
		method: 'get'
	})	
}
/**
 * 积分订单核销
 */
export const updateVerification = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralReciveRecordService/updateVerification',
		data: data,
		method: 'get'
	})	
}
/**
 * 查看二级分类
 */
export const findChildrenListByParent = (data) => {
	return https ({
		url: '/api/uc/mobile/productCategoryService/findChildrenListByParent',
		data: data,
		method: 'get'
	})	
}
/**
 * 我的订单-积分
 */
export const selectUserIntegralReciveRecordById = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralReciveRecordService/selectUserIntegralReciveRecordById',
		data: data,
		method: 'get'
	})	
}
/**
 * 登录
 */
export const login = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralService/login',
		data: data,
		method: 'get'
	})	
}
/**
 * 地址-详情
 */
export const userAddressServiceget = (data) => {
	return https ({
		url: '/api/uc/mobile/userAddressService/get',
		data: data,
		method: 'get'
	})	
}
/**
 * 地址-列表
 */
export const userAddressServicefindList = (data) => {
	return https ({
		url: '/api/uc/mobile/userAddressService/findList',
		data: data,
		method: 'get'
	})	
}
/**
 * 地址-新建
 */
export const userAddressServiceinsert = (data) => {
	return https ({
		url: '/api/uc/mobile/userAddressService/insert',
		data: data,
		method: 'post'
	})	
}
/**
 * 地址-更新
 */
export const userAddressServiceupdate = (data) => {
	return https ({
		url: '/api/uc/mobile/userAddressService/update',
		data: data,
		method: 'post'
	})	
}
/**
 * 地址-删除
 */
export const userAddressServicedelete = (data) => {
	return https ({
		url: '/api/uc/mobile/userAddressService/delete',
		data: data,
		method: 'post'
	})	
}
/**
 * 确认收货
 */
export const updateDeliveryStatus = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralReciveRecordService/updateDeliveryStatus',
		data: data,
		method: 'post'
	})	
}
/**
 * 查询个人积分
 */
export const getUserIntegralByCardNo = (data) => {
	return https ({
		url: '/api/uc/mobile/userIntegralService/getUserIntegralByCardNo',
		data: data,
		method: 'get'
	})	
}

/**
 * 查询个人积分
 */
export const pickupStationMobileService = (data) => {
	return https ({
		url: '/api/uc/mobile/pickupStationMobileService/findList',
		data: data,
		method: 'get'
	})	
}
